package com.cooge.jiexi;

public class bilibi {

	public static void main(String[] args) throws Exception {
		
		
		
		String link = "http://www.bilibili.com/video/av2575693/";
		String source = NetUtil.getGZIPHtml(link);
		source = source.substring(source.indexOf("EmbedPlayer"));
		source = source.substring(0,source.indexOf("script"));
		source = source.substring(source.indexOf("cid"));
		source = source.substring(0,source.indexOf("&"));
		String playurl = "http://interface.bilibili.com/playurl?appkey=c1b107428d337928&"+source+"&otype=json";
		playurl = NetUtil.getHtml(playurl);
		
		playurl = playurl.substring(playurl.indexOf("http"));
		
		playurl = playurl.substring(0, playurl.indexOf("\""));
		
		System.out.println(playurl);

	}

}
